﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDB.LinqModel.Data;

namespace CDB.LinqModel
{
    public partial class Architect
    {
        #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion

        public Architect(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateArchitect(this);
        }
        public void Update()
        {
            _dataObject.UpdateArchitect(this);
        }
        public List<Architect> GetAllArchitects()
        {
            return _dataObject.GetAllArchitects();
        }
        public void Delete()
        {
            _dataObject.DeleteArchitect(this);
        }
        public void GetArchitectById()
        {
            _dataObject.GetArchitectById(this);
        }
        public void GetArchitectByUsername()
        {
            _dataObject.GetArchitectByUsername(this);
        }
        //public List<Architect> GetArchitectsByCity(int cityId)
        //{
        //    return _dataObject.GetArchitectsByCity(cityId);
        //}
        public List<Architect> GetArchitectsByLocation(string location)
        {
            return _dataObject.GetArchitectsByLocation(location);
        }
    }
}
